package sax;

import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

public class MyDefaultHandler extends DefaultHandler{

	@Override
	public void startDocument() throws SAXException {
		System.out.println("Doc start!");
	}

	@Override
	public void endDocument() throws SAXException {
		System.out.println("Doc end!");
	}

	@Override
	public void startElement(String uri, String localName, String qName,
			Attributes attributes) throws SAXException {
		System.out.println("element"+qName+" start..");
	}

	@Override
	public void endElement(String uri, String localName, String qName)
			throws SAXException {
		System.out.println("element"+qName+" end..");
	}

	@Override
	public void characters(char[] ch, int start, int length)
			throws SAXException {
		System.out.println(new String(ch)+"\t"+start+"\t"+length);
	}
	

}
